<template>
    <section>
        	<el-table
			    :data="tableData"
			    stripe
			    style="width: 100%">
			    
			    <el-table-column  label='序号' align="center" width="80px">
			     	<template slot-scope="scope">
				        <span style="margin-left: 10px">{{Number(scope.$index)+1}}</span>
				      </template>
			    </el-table-column>
			    
			    <el-table-column
			      v-for="(val,key) in tableTitle"
			      :prop="key"
			      :label="val"
			      width="180"
			      align="center"
			      >
			    </el-table-column>
			    
			     <el-table-column  label='操作' align="center">
			     	<template slot-scope="scope">
			     		  <span class="diy_pic" style="margin-left: 10px" @click="edit" ><img src="../../../images/server02.png"/></span>
			     		  <span class="diy_pic"  style="margin-left: 10px" @click="edit" ><img src="../../../images/server03.png"/></span>
			     		  <span class="diy_pic"  style="margin-left: 10px" @click="edit" ><img src="../../../images/server04.png"/></span>
			     		  <span class="diy_pic" @click="peizhi(scope)"  style="margin-left: 10px" ><img src="../../../images/server07.png"/></span>
				    </template>
			    </el-table-column>
			   
			  </el-table>
			  <p style="margin-top: 15px;">
			  	<el-pagination
				  background
				  @current-change="handleCurrentChange"
				  layout="prev, pager, next"
				  :total="1000">
				</el-pagination>
			  </p>
			   
    </section>
</template>

<script>
    
    export default {
    	props:{
    		tableTitle:Object,
    		tableData:Array,
    	},
        data() {
          return {
          	
          };
        },
        methods: {
        	detail(scope){
        		this.$emit('detail',scope);
        	},
        	edit(){
        		
        	},
        	updata(scope){
        			this.$emit('updata',scope);
        	},
        	del(scope){
        		console.log(scope);
			    this.$emit('del',scope);
        	},
        	handleCurrentChange(val) {
		         this.$emit('handleCurrentChange',val);
		    },
		    peizhi(val){
		    	this.$emit('peizhi',val);
		    }
        }
  };
</script>

<style scoped="scoped">
    .diy_pic img{
    	width: 24px;
    }
</style>